package com.sugar.follow.up.module.business.dal.dataobject.followuptemplatequestion;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.sugar.follow.up.module.business.dal.dataobject.questionnairetemplatequestion.dto.OptionDTO;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.sugar.follow.up.framework.mybatis.core.dataobject.BaseDO;

/**
 * 随访模板题目 DO
 *
 * @author Ysugar
 */
@TableName(value = "business_follow_up_template_question", autoResultMap = true)
@KeySequence("business_follow_up_template_question_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FollowUpTemplateQuestionDO extends BaseDO {

    /**
     * 题目ID
     */
    @TableId
    private Long id;
    /**
     * 随访模板ID
     */
    private Long templateId;
    /**
     * 标题
     */
    private String title;
    /**
     * 提示语
     */
    private String tip;
    /**
     * 题型（0单选 1多选 2填空 3问答 4日期）
     */
    private Integer type;
    /**
     * 题目选项
     */
    @TableField(updateStrategy = FieldStrategy.ALWAYS, typeHandler = JacksonTypeHandler.class)
    private List<OptionDTO> options;
}
